class UserMailer < ActionMailer::Base
  default from: "traynordou@163.com"
  
  def verification_email(user)
    @user = user
    @url  = 'http://example.com/login'
    @token = user.activation_code
      mail(to: @user.email, subject: '欢迎使用--拙政云')
  end
  
  def forget_password_email(user)
      @user = user
      @url  = 'http://example.com/login'
      @token = user.reset_password_token 
        mail(to: @user.email, subject: '欢迎使用--拙政云')
  end
  
end
